<?php

namespace ldl\mysql;

class DbManager{
	private $pool;
	function __construct(){
		@$chars=DB_CHARSET;
		$this->pool=\Amp\Mysql\pool("host=".DB_HOST.";user=".DB_USER.";pass=".DB_PASS.";db=".DB_NAME.";charset=".$chars);
	}
	function close(){
		$this->pool->close();
	}
	
	//function getConnect();
	/*
	 * select * from xx 
	 * */
	function execute($sql){
		return  $this->pool->query($sql);
	}
	/**
	 *select * frm xx where x=? ,[1]
	 */ 
	function prepare($sql,$data){
		return  $this->pool->prepare($sql);
	
	}
}
